AutoIt BMP Functions
By:Evilertoaster

When Providing a 'color' parameter, the mode wil be whichever is set by Opt("ColorMode") (Defualt=0 "RRGGBB")
Functions-

_BMPGetWidth($BMPHandle)
Returns the width in pixels of the BMP. Same as Ubound($BMPHandle,1)

_BMPGetHeight($BMPHandle)
Returns the height in pixels of the BMP. Same as Ubound($BMPHandle,2)

_BMPGetChecksum($BMPHandle[,$step=1])
Returns a alder checksum of the BMP. Use step to skip pixels in the check (for faster results).
The Algorithem is supossed to be the same as AutoIts internal PixelChecksum but for some reason the output is not the same. This may be corrected in the future. But for now it does give a checksum that is unique.

_PixelFill($BMPHandle,$x,$y,$color[,$variation=0])
Does a paint "fill" effect on the given pixel with the given color. It will also shade in pixels within the given shade variation (defualt 0 is exact match for pixel color, 1 would allow 1 shade lighter or darker than the starting pixel ect.).

_RectangleWrite($BMPhandle,$x,$y,$Width,$Height,$color[,$thickness=1])
Draws a rectangle with center point $x,$y. Total height = $Height, Total width = $width, color = $color, thickness=$thickness (1 if ommited)
Returns the area of the rectangle.
Returns -1 for invalid thickness

_ElipseWrite($BMPhandle,$x,$y,$Width,$Height,$color[,$thickness=1])
Draws an ellipse centered at ($x,$y) with width $Width and height $Height.
Returns the circumfrence of the ellipse.
Returns -1 for invalid thickness

_LineWrite($BMPhandle,$x1,$Y1,$x2,$y2,$color[,$thickness=1])
Draws a line of color $color from the point ($x1,$y1) to the point ($x2,$y2).
Thickness on the line can also be given (defualts to 1 if omitted)
Returns the length of the line drawn.
Returns -1 for invalid thickness

_BMPOpen($Path[,$Progress])
Creates a BMP 'Handle' from a BMP file.$Progress=1 (default) means to show a progress bar. $Progress<>1 Will not show a Progress Bar
Returns -1 if there was a error opening the file.
Returns -2 if the file is not a BMP file.

_BMPCreate($Width,$Height)
Creates a BMP 'Handle' to be used in later functions. The BMP dimensions will be decided by the parameters.

_PixelWrite($BMPHandle,$X,$Y,$Color)
Writes a pixel of color $Color to the BMP handle $BMPHandle at coordinate ($X,$y)
Returns 1 on success.
Returns -1 if coordinate is out of bounds.

_PixelRead($BMPHandle,$X,$Y)
Returns the color at the pixel coordinate and BMPHandle given.
Returns -1 if coordinate is out of bounds.

_BMPWrite($BMPHandle,$Fpath[,$Progress])
Writes the BMP Handle $BMPHandle to the file path $Fpath. $Progress=1 (default) means to show a progress bar. $Progress<>1 Will not show a Progress Bar.
Returns -2 if there was an error opening the output file.
Returns -1 if there was an error writing to the output file.
Returns 1 on success.